<template>
  <div class="essay-read">
    <div class="box title-wrap">
      <div :class="['iconfont', icon]"></div>
      <div class="title">{{ title }}</div>
    </div>
    <div class="box more">
      <div class="title">更多</div>
      <div class="iconfont icon-arrow-right-copy-copy"></div>
    </div>
  </div>
</template>

<script setup>
const props = defineProps({
  icon: '',
  title: '',
  more: true
})
</script>

<style lang="scss" scoped>
.essay-read {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.4rem;
  padding: 0 1.4rem;
  height: 5rem;
  background: #fff;
  border-radius: 1rem;
  box-sizing: border-box;

  .box {
    display: flex;

    &.title-wrap {
      font-size: 1.6rem;

      .iconfont {
        margin-top: -.2rem;
        background-image: linear-gradient(to top right, green, white);
        -webkit-background-clip: text;
        color: transparent;
        font-size: 2.2rem;
        font-weight: bold;
      }

      .title {
        padding-left: .8rem;
        font-weight: bold;
      }
    }

    &.more {
      .iconfont {
        margin-top: .2rem;
        font-size: 1.6rem;
        color: #999;
      }

      .title {
        padding-right: .4rem;
        font-size: 1.4rem;
        color: #777;
      }
    }
  }
}
</style>